<template>
  <div>
    <up-down-layout :header="'已办任务'" :handleFlag="true" >
      <template slot="query">
        <search-form :componentList="componentList" :formValue="queryParas" @handleFilter="handleFilter"
          @clearParam="clearParam">
        </search-form>
      </template>
      <template slot="table">
        <!-- table表格 -->
        <data-table :toolMenuFlag="false" @onCreateRow="addData" :sourceData="sourceData" :queryParas="queryParas"
          @onEditRow="onEditRow" :menuFlag="false" :IsRight="false" :operateBtnLayout="operateBtnLayout"
          :columns="columns" :api="api" :loadPage="'getDoneTasks'" :loadCount="loadCount" :operatWidth="'80px'"
          >
        </data-table>
      </template>
    </up-down-layout>
    <workEdit :editModel="editModel" v-if="dialogVisible" :visible.sync="dialogVisible" :api="api" :form="item"
      :tabsActive="'second'" @handSearch="handleFilter" :title="item.wfProcessDTO.processName"/>
  </div>
</template>
<script>
import BaseManage from '@/pages/baseManage'
import upDownLayout from '@/components/element/upDownLayout'
import searchForm from '@/components/element/searchForm'
import DataTable from '@/components/element/DataTable'
import workEdit from '@/pages/processCenter/personWork/workEdit'
import { processRest } from '@/api/Process/processApi'
export default {
  // 继承baseManage里的公共方法和定义的属性
  extends: new BaseManage(),
  name: 'completeWork',
  components: {
    upDownLayout,
    searchForm,
    DataTable,
    workEdit
  },
  data () {
    return {
      componentList: [
      ],
      queryParas: {
        // 受理人ID
        assignee: this.$store.getters.userId
      },
      columns: [
      ],
      // 操作列需要显示的按钮
      operateBtnLayout: 'V',
      // 控制弹框显示隐藏
      dialogVisible: false
    }
  },
  computed: {
    api () {
      return processRest
    }
  },
  methods: {
  }
}
</script>
